<?php 
	header("Content-Type:text/html;charset=utf-8");

	$str = "WAMP";
													//填补字符串
	echo str_pad($str, 10);
	echo "<br/>";
	echo str_pad($str, 10,"-=",STR_PAD_LEFT);
	echo "<br/>";
	echo str_pad($str, 10,"_",STR_PAD_BOTH);
	echo "<br/>";
	echo str_pad($str, 20,"_");

													//大小写转换

	$wamp = "lamp is composed of Linux、Apache、MySQL and PHP";	//字符集不对"、"会乱码！
	echo "<br/>";
	echo strtolower($wamp);
	echo "<br/>";			
	echo strtoupper($wamp);
	echo "<br/>";			
	echo ucfirst($wamp);
	echo "<br/>";			
	echo ucwords($wamp);
	echo "<br/>";			
	echo ucfirst(strtolower($wamp));

													//习惯用\n换行的处理函数
	$n = "\nYihang\nErhang";
	echo nl2br($n);

	$html = "<B>WebServer;</B>&'Linux'&'Apache'";
	echo "<br/>";			
	echo $html;
	echo "<br/>";
	echo htmlspecialchars($html,ENT_COMPAT);
 ?>